1 E = 20:F = 256: DIM E$(F,E): DIM F$(E): DIM A(E): FOR G = 1 TO E: READ F$(G): NEXT G: DATA "RECORD NUMBER: ","ITEM: ","COST: $","DATE PURCHASES(MM/DD/YY): ","VENDOR: ","WARRANTY (TIME PERIOD): ","LOCATION (RM# & BLDG): ","EQUIPMENT CONTROL #:"
2 DATA "SERIAL NUMBER: ","FINAL DISPOSITION: ","1. DATE REPAIRED (MM/DD/YY): ","COST OF REPAIR #1: $","2. DATE REPAIRED (MM/DD/YY): ","COST OF REPAIR #2: $"
3 DATA "3. DATE REPAIRED (MM/DD/YY): ","COST OF REPAIR #3: $","4. DATE REPAIRED (MM/DD/YY): ","COST OF REPAIR #4: $": DATA "5. DATE REPAIRED (MM/DD/YY): ","COST OF REPAIR #5: $"
10 HOME : VTAB 3: INVERSE : HTAB 10: PRINT "EQUIPMENT INVENTORY": HTAB 15: PRINT "MAIN MENU": NORMAL : PRINT : PRINT : HTAB 4: INVERSE : PRINT " 1 ";: NORMAL : PRINT " ADD NEW EQUIPMENT ITEM": PRINT : HTAB 4: INVERSE : PRINT " 2 ";: NORMAL : PRINT " MODIFY AN EXISTING ITEM": PRINT : HTAB 4: INVERSE : PRINT " 3 ";: NORMAL : PRINT " DELETE AN EXISTING ITEM": PRINT : HTAB 4: INVERSE : PRINT " 4 ";: NORMAL : PRINT " LIST INVENTORY ITEMS": PRINT : HTAB 4
11 INVERSE : PRINT " 5 ";: NORMAL : PRINT " COST OF PURCHASES OR REPAIRS": PRINT : HTAB 4: INVERSE : PRINT " 6 ";: NORMAL : PRINT " PRINTER ROUTINE": PRINT : HTAB 4: INVERSE : PRINT " 7 ";: NORMAL : PRINT " QUIT": PRINT : PRINT
12 PRINT "PLEASE TYPE IN THE NUMBER OF THE": PRINT "ITEM YOU WOULD LIKE: ";: GET B$:B = VAL(B$): IF B <1 OR B >8 THEN GOTO 12
13 ON B GOSUB 24,51,62,76,81,104
19 IF B = 7 THEN GOTO 9
20 GOTO 10
21 HOME : VTAB 3: HTAB 12: INVERSE : PRINT "INSTRUCTIONS": NORMAL : PRINT : PRINT : PRINT " THIS PROGRAM IS DESIGNED TO ALLOW": PRINT "THE USER TO MAKE A PERMANENT DISK": PRINT "FILE OF ALL EQUIPMENT OWNED. IT IS": PRINT "SUGGESTED THAT ONLY EQUIPMENT ITEMS": PRINT "COSTING MORE THAN $200 BE INCLUDED"
22 PRINT "IN THE INVENTORY. ALONG WITH DATA": PRINT "ON EQUIPMENT SUCH AS COST, DATE PUR-": PRINT "CHASED, SERIAL NUMBER, ETC., THE USER": PRINT "CAN INPUT REPAIR INFORMATION ON EACH": PRINT "PIECE OF EQUIPMENT.": PRINT
23 PRINT "MENU CHOICES ARE GIVEN FOR ALL OPTIONS.": PRINT : PRINT : PRINT "PRESS ANY KEY TO BEGIN ";: GET G$: RETURN
24 HOME : VTAB 3: HTAB 12: INVERSE : PRINT "INSTRUCTIONS": NORMAL : PRINT : PRINT : PRINT " THIS PART OF THE PROGRAM ALLOWS": PRINT "YOU TO ADD NEW ITEMS TO THE INVENTORY": PRINT "AND SAVE THESE ITEMS. THE PROGRAM": PRINT "WILL ASK YOU FOR EACH CATEGORY OF DATA": PRINT "SEPARATELY. IF YOU DO NOT HAVE INFOR-"
25 PRINT "MATION TO INPUT FOR A CATEGORY, SIMPLY": PRINT "PRESS RETURN TO MOVE ON TO THE NEXT": PRINT "CATEGORY.": PRINT : PRINT " AFTER YOU HAVE FINISHED INPUTTING": PRINT "DATA FOR AN ITEM, THE PROGRAM WILL": PRINT "DISPLAY THAT DATA AND ALLOW YOU
26 PRINT "MAKE ANY CORRECTIONS BEFORE SAVING AN": PRINT "ITEM TO DISK.": PRINT : PRINT : PRINT "PRESS ANY KEY TO BEGIN ";: GET G$:I = H
27 I = I +1: FOR G = 2 TO E: HOME : VTAB 6: IF G = 2 OR G = 5 THEN PRINT "MAXIMUM OF 25 CHARACTERS ALLOWED": PRINT : PRINT
28 IF G = 3 OR G = 12 OR G = 14 OR G = 16 OR G = 18 OR G = 20 THEN PRINT "COSTS MAY HAVE DECIMALS BUT NO COMMAS": PRINT "AND 9 CHARACTERS": PRINT : PRINT
29 IF G = 6 OR G = 7 OR G = 8 OR G = 10 THEN PRINT "MAXIMUM OF 10 CHARACTERS ALLOWED": PRINT : PRINT
30 IF G = 4 OR G = 11 OR G = 13 OR G = 15 OR G = 17 OR G = 19 THEN PRINT "MAXIMUM OF 8 CHARACTERS ALLOWED": PRINT : PRINT
31 IF G = 9 THEN PRINT "MAXIMUM OF 15 CHARACTERS ALLOWED": PRINT : PRINT
32 INVERSE : PRINT F$(G);: NORMAL : INPUT " ";E$(I,G): NEXT G: HOME : FOR G = 2 TO E: IF G = 11 THEN PRINT
33 PRINT F$(G);: PRINT " ";: INVERSE : PRINT E$(I,G): NORMAL : NEXT G
34 PRINT : PRINT "IS THIS CORRECT (Y OR N)? ";: GET B$: PRINT : IF B$ < >"Y" AND B$ < >"N" THEN PRINT : GOTO 34
35 IF B$ = "N" THEN GOSUB 45
36 GOSUB 44: PRINT : PRINT
37 PRINT "WOULD YOU LIKE TO SAVE ITEM (Y OR N)?";: GET A$: IF A$ = "N" THEN I = I -1: GOTO 40
38 IF A$ < >"Y" AND A$ < >"N" THEN PRINT : GOTO 37
39 H = H +1:E$(H,1) = STR$(H): GOSUB 103
40 HOME : VTAB 6
41 PRINT "WOULD YOU LIKE TO ADD ANOTHER": PRINT "EQUIPMENT ITEM (Y OR N)? ";: GET C$: IF C$ < >"Y" AND C$ < >"N" THEN PRINT : GOTO 41
42 IF C$ = "Y" GOTO 27
43 RETURN
44 HOME : VTAB 10: HTAB 5: PRINT "CHECKING EQUIPMENT ITEM": HTAB 5: PRINT "PLEASE BE PATIENT":A = FRE(A):H$ = " ": FOR G = 2 TO E:E$(I,G) = RIGHT$(H$ +E$(I,G),A(G)): NEXT G: RETURN
45 FOR G = 2 TO E
46 HOME : VTAB 6: PRINT F$(G);: PRINT " ";: INVERSE : PRINT E$(I,G): NORMAL : PRINT : PRINT
47 PRINT "IS THIS CORRECT (Y OR N)? ";: GET G$: IF G$ < >"Y" AND G$ < >"N" THEN PRINT : GOTO 47
48 IF G$ = "Y" THEN GOTO 50
49 HOME : VTAB 6: PRINT "PLEASE ENTER CORRECT DATA": PRINT : PRINT : INVERSE : PRINT F$(G);: NORMAL : INPUT " ";E$(I,G): GOTO 46
50 NEXT G:B$ = "Y": HOME : VTAB 6: RETURN
51 HOME : INVERSE : HTAB 14: PRINT "INSTRUCTIONS": NORMAL : PRINT : PRINT : PRINT " IN ORDER TO MODIFY AN EXISTING": PRINT "INVENTORY ITEM, YOU MUST FIRST": PRINT "SELECT THE ITEM TO BE MODIFIED.": PRINT "YOU WILL BE SHOWN A LIST OF ALL": PRINT "THE INVENTORY ITEMS. NOTE THE": PRINT "ITEM NUMBER OF THE ITEM YOU WANT"
52 PRINT "TO MODIFY. YOU WILL BE ASKED TO": PRINT "TYPE IN THAT NUMBER.": PRINT : PRINT
53 PRINT "TYPE L TO LIST INVENTORY OR M TO": PRINT "RETURN TO MAIN MENU: ";: GET G$: IF G$ < >"L" AND G$ < >"M" THEN PRINT : GOTO 53
54 IF G$ = "M" THEN GOTO 10
55 GOSUB 76: PRINT : PRINT : PRINT "PLEASE TYPE IN THE NUMBER OF THE ITEM": PRINT "YOU WISH TO MODIFY AND PRESS RETURN: ";: INPUT "";I: GOSUB 123: GOSUB 45: GOSUB 44: HOME : VTAB 10
56 PRINT "WOULD YOU LIKE TO SAVE THIS CHANGE": PRINT "ON DISK (Y OR N)? ";: GET I$: IF I$ < >"Y" AND I$ < >"N" THEN PRINT : GOTO 56
57 IF I$ = "Y" THEN GOSUB 103
58 HOME : VTAB 10
59 PRINT "WOULD YOU LIKE TO MODIFY OTHER": PRINT "ITEMS (Y OR N)? ";: GET J$: IF J$ < >"Y" AND J$ < >"N" THEN PRINT : GOTO 59
60 IF J$ = "Y" THEN GOTO 51
61 RETURN
62 HOME : INVERSE : HTAB 14: PRINT "INSTRUCTIONS": NORMAL : PRINT : PRINT : PRINT " THIS PROGRAM DOES NOT ACTUALLY": PRINT "DELETE AN ITEM. IT AUTOMATICALLY": PRINT "MODIFIES THE ITEM TO READ 'DELETED'": PRINT "AND BLANKS OUT ALL DATA ASSOCIATED": PRINT "WITH THAT ITEM. THIS ALLOWS YOU TO"
63 PRINT "REUSE THIS ITEM NUMBER BY SIMPLY": PRINT "CALLING UP THE MODIFY ROUTINE IN THE": PRINT "MAIN MENU AND CHANGING THE DATA IN": PRINT "THE DELETED ITEM.": PRINT : PRINT " IN ORDER TO DELETE AN EXISTING": PRINT "ITEM YOU MUST FIRST SELECT THE ITEM"
64 PRINT "TO BE DELETED. YOU WILL BE SHOWN": PRINT "A LIST OF ALL INVENTORY ITEMS. NOTE": PRINT "THE ITEM NUMBER OF THE ITEM YOU WISH": PRINT "TO DELETE. YOU WILL BE ASKED TO": PRINT "TYPE IN THAT NUMBER.": PRINT : PRINT
65 PRINT "TYPE L TO LIST INVENTORY OR M TO": PRINT "RETURN TO THE MAIN MENU: ";: GET G$: IF G$ < >"L" AND G$ < >"M" THEN PRINT : GOTO 65
66 IF G$ = "M" THEN GOTO 10
67 GOSUB 76: HOME : VTAB 6: PRINT "PLEASE TYPE IN THE NUMBER OF THE ITEM": PRINT "YOU WOULD LIKE TO DELETE FROM THE": PRINT "PERMANENT DISK FILE AND PRESS RETURN: ";: PRINT : PRINT : INPUT " ";I: GOSUB 123: HOME : FOR G = 2 TO E: IF G = 11 THEN PRINT
68 PRINT F$(G);: PRINT " ";: INVERSE : PRINT E$(I,G): NORMAL : NEXT G
69 PRINT : PRINT "IS THIS THE ITEM YOU WISH TO DELETE": PRINT "(Y OR N): ";: GET J$: IF J$ < >"Y" AND J$ < >"N" THEN PRINT : GOTO 69
70 IF J$ = "N" THEN GOTO 72
71 HOME :E$(I,2) = "DELETED": FOR G = 3 TO E:E$(I,G) = " ": NEXT G: GOSUB 44: HOME : PRINT D$;"OPEN EQUIP INVENTORY,L235": PRINT D$;"WRITE EQUIP INVENTORY,R"I: FOR G = 1 TO E: PRINT E$(I,G): NEXT G: PRINT D$;"CLOSE"
72 HOME : VTAB 8
73 PRINT "WOULD YOU LIKE TO DELETE ANOTHER": PRINT "ITEM (Y OR N)? ";: GET K$: IF K$ < >"Y" AND K$ < >"N" THEN PRINT : GOTO 73
74 IF K$ = "Y" THEN GOTO 62
75 RETURN
76 HOME : PRINT D$;"OPEN EQUIP INVENTORY,L235": FOR G = 1 TO H: PRINT D$;"READ EQUIP INVENTORY,R"G: INPUT E$(G,1),E$(G,2): HOME : VTAB 6: HTAB 4: PRINT "PLEASE BE PATIENT-READING FILE": NEXT G: PRINT D$: HOME :A = 1: FOR G = 1 TO H: PRINT " ";E$(G,1);" ";: NORMAL : PRINT " ";E$(G,2): IF G = A *20 THEN GOTO 78
77 NEXT G: PRINT : PRINT "PRESS ANY KEY TO CONTINUE: ";: GET L$: GOTO 80
78 A = A +1: PRINT : PRINT "PLEASE TYPE C TO CONTINUE OR": PRINT "S TO STOP LISTING: ";: GET C$: IF C$ < >"C" AND C$ < >"S" THEN PRINT : GOTO 78
79 IF C$ = "C" THEN HOME : GOTO 77
80 PRINT D$;"CLOSE": PRINT D$: RETURN
81 HOME : VTAB 4: HTAB 14: INVERSE : PRINT "INSTRUCTIONS": NORMAL : PRINT : PRINT : PRINT " THE PROGRAM WILL ALLOW YOU TO": PRINT "CALCULATE THE COST OF PURCHASES AND/": PRINT "OR THE COST OF REPAIRS FOR ONE YEAR": PRINT "OR SEVERAL (UP TO 4) YEARS.": PRINT : PRINT : HTAB 5: INVERSE : PRINT " 1 ";: NORMAL : PRINT " COST OF EQUIPMENT PURCHASES": PRINT
82 HTAB 5: INVERSE : PRINT " 2 ";: NORMAL : PRINT " COST OF REPAIRS": PRINT : HTAB 5: INVERSE : PRINT " 3 ";: NORMAL : PRINT " COST OF EQUIPMENT AND REPAIRS": PRINT : HTAB 5: INVERSE : PRINT " 4 ";: NORMAL : PRINT " RETURN TO MAIN MENU": PRINT : PRINT : PRINT "PLEASE TYPE IN THE NUMBER OF YOUR"
83 PRINT "CHOICE (1, 2, 3, OR 4): ";: GET C$:C = VAL(C$): IF C <1 OR C >4 THEN PRINT : GOTO 83
84 IF C = 4 THEN RETURN
85 HOME : VTAB 6: PRINT "PLEASE INPUT THE NUMBER OF YEARS": PRINT "FOR WHICH YOU WOULD LIKE TO CALCU-": PRINT "LATE THE COSTS. A MAXIMUM OF 4": PRINT "YEARS MAY BE CALCULATED AT ONE TIME."
86 PRINT "TYPE IN EITHER 1, 2, 3, OR 4: ";: GET M$:K = VAL(M$): IF K <1 OR K >4 THEN GOTO 86
87 PRINT : PRINT : PRINT "PLEASE TYPE IN EACH YEAR AND": PRINT "PRESS RETURN": PRINT : FOR G = 1 TO K: PRINT : PRINT "YEAR ";G;": ";: INPUT " ";N$(G): NEXT G: HOME : PRINT D$;"OPEN EQUIP INVENTORY,L235": FOR G = 1 TO H: PRINT D$;"READ EQUIP INVENTORY,R"G: FOR J = 1 TO E: INPUT E$(G,J): HOME : VTAB 10: HTAB 2: PRINT "PLEASE BE PATIENT-READING FILE": NEXT J: NEXT G: PRINT D$;"CLOSE"
88 L = 0:M = 0: FOR G = 1 TO K:B(G) = 0:C(G) = 0: NEXT G: IF C = 2 THEN GOTO 91
89 FOR G = 1 TO K: FOR J = 1 TO H: IF RIGHT$(N$(G),2) = RIGHT$(E$(J,4),2) THEN B(G) = B(G) + VAL(E$(J,3))
90 NEXT J:L = L +B(G): NEXT G: IF C = 1 THEN GOTO 96
91 FOR G = 1 TO K: FOR J = 1 TO H: IF RIGHT$(N$(G),2) = RIGHT$(E$(J,11),2) THEN C(G) = C(G) + VAL(E$(J,12))
92 IF RIGHT$(N$(G),2) = RIGHT$(E$(J,13),2) THEN C(G) = C(G) + VAL(E$(J,14))
93 IF RIGHT$(N$(G),2) = RIGHT$(E$(J,15),2) THEN C(G) = C(G) + VAL(E$(J,16))
94 IF RIGHT$(N$(G),2) = RIGHT$(E$(J,17),2) THEN C(G) = C(G) + VAL(E$(J,18))
99 PRINT "WOULD YOU LIKE THIS TABLE PRINTED": PRINT "(Y OR N): ";: GET P$: IF P$ < >"Y" AND P$ < >"N" THEN GOTO 99
100 IF P$ = "N" THEN PRINT : PRINT : GOTO 81
101 PRINT "PLEASE TURN ON PRINTER.": PRINT "<CTRL-D>PR#1": GOTO 96
102 PRINT : PRINT "PRESS ANY KEY TO CONTINUE";: GET G$: GOTO 81
103 HOME : PRINT D$;"OPEN EQUIP INVENTORY,L235": PRINT D$;"WRITE EQUIP INVENTORY,R"I: FOR G = 1 TO E: PRINT E$(I,G): NEXT G: PRINT D$: PRINT D$;"WRITE EQUIP INVENTORY,R0":E$(0,1) = STR$(H): PRINT E$(0,1): PRINT D$: PRINT D$;"CLOSE EQUIP INVENTORY": RETURN
104 HOME : VTAB 6: HTAB 14: INVERSE : PRINT "INSTRUCTIONS": NORMAL : PRINT : PRINT : PRINT " THE PROGRAM WILL ALLOW YOU TO": PRINT "PRINT AN INDIVIDUAL ITEM, ALL ITEMS": PRINT "OR THE LISTING OF ITEMS NAMES.": PRINT : PRINT : INVERSE : PRINT " 1 ";: NORMAL : PRINT " ";"PRINT ONE ITEM": PRINT : INVERSE : PRINT " 2 ";: NORMAL : PRINT " PRINT ALL ITEMS": PRINT
105 INVERSE : PRINT " 3 ";: NORMAL : PRINT " PRINT ONLY ITEM NAMES": PRINT : INVERSE : PRINT " 4 ";: NORMAL : PRINT " RETURN TO MAIN MENU": PRINT : PRINT
106 PRINT "PLEASE TYPE IN THE NUMBER OF THE": PRINT "PRINT OPTION YOU WOULD LIKE: ";: GET Q$:N = VAL(Q$): IF N <1 OR N >4 THEN PRINT : GOTO 106
107 IF N = 1 THEN GOTO 115
108 IF N = 3 THEN GOTO 120
109 IF N = 4 THEN RETURN
110 HOME : FOR G = 1 TO H: VTAB 10: HTAB 6: PRINT "READING FILES": PRINT D$;"OPEN EQUIP INVENTORY,L235": PRINT D$;"READ EQUIP INVENTORY,R"G: FOR J = 1 TO E: INPUT E$(G,J): NEXT J: NEXT G
111 HOME : VTAB 6: PRINT "PLEASE TURN ON PRINTER AND POSITION": PRINT "PAPER TO TOP OF NEW PAGE": PRINT : PRINT : PRINT "PRESS ANY KEY WHEN READY TO BEGIN ";: GET J$: IF N = 1 THEN GOTO 118
112 IF N = 3 THEN GOTO 121
113 HOME : PRINT : PRINT "<CTRL-D>PR#1": FOR G = 1 TO H: PRINT : PRINT : PRINT : PRINT : PRINT : PRINT : FOR J = 1 TO E: IF J = 2 OR J = 3 OR J = 4 OR J = 5 OR J = 6 OR J = 7 OR J = 8 OR J = 9 OR J = 10 OR J = 11 THEN PRINT
114 PRINT F$(J);E$(G,J): NEXT J: FOR O = 1 TO 30: PRINT : NEXT O: NEXT G: GOTO 122
115 HOME : GOSUB 76: PRINT : PRINT
116 PRINT "PLEASE TYPE IN THE NUMBER OF THE": PRINT "ITEM YOU WOULD LIKE TO PRINT: ";: INPUT "";I: IF I <1 OR I >H THEN GOTO 116
117 GOSUB 123: GOTO 111
118 HOME : PRINT : PRINT "<CTRL-D>PR#1": FOR D = 1 TO 6: PRINT : NEXT D: FOR G = 1 TO E: IF G = 2 OR G = 3 OR G = 4 OR G = 5 OR G = 6 OR G = 7 OR G = 8 OR G = 9 OR G = 10 OR G = 11 THEN PRINT
119 PRINT F$(G);E$(I,G): NEXT G: GOTO 122
120 GOTO 111
121 GOSUB 76: PRINT : PRINT "<CTRL-D>PR#1": FOR G = 1 TO H: PRINT E$(G,1);" ";E$(G,2): NEXT G